﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPizaPiola.master" AutoEventWireup="true" CodeFile="frmAdministradorRol.aspx.cs" Inherits="frmAdministradorRol" %>
<asp:Content ID ="Content1" ContentPlaceHolderID="head" runat="server">  

    <script language="javascript" type="text/javascript">
        function ValidarUsuario(source, arguments) {
            if (arguments.Value < 1) {
                arguments.IsValid = false;
            }
            else {
                arguments.IsValid = true;
            }
        }
        function ValidarRol(source, arguments) {
            if (arguments.Value < 1) {
                arguments.IsValid = false;
            }
            else {
                arguments.IsValid = true;
            }
        }
    </script>      
    <style type="text/css">
        .style7
        {
            width: 100%;
        }
        .style8
        {
            width: 186px;
        }
        .style9
        {
        }
        .style10
        {
            width: 236px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">                
    <table class="style7">
        <tr>
            <td align="center" colspan="3">
                <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Italic="True" 
                    Font-Size="Larger" Text="Administracion de Roles"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style8">
                <asp:Label ID="LblUsuario" runat="server" Text="Usuario:"></asp:Label>
            </td>
            <td class="style10">
                <asp:DropDownList ID="DropUsuario" runat="server">
                    <asp:ListItem Value="0"></asp:ListItem>
                    <asp:ListItem>Uno</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                <asp:CustomValidator ID="CustomValidator1" runat="server" 
                    ControlToValidate="DropUsuario" ErrorMessage="Seleccione un valor valido" 
                    ClientValidationFunction="ValidarUsuario" display="Dynamic"                    
                    onservervalidate="CustomValidator1_ServerValidate">*</asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td class="style8">
                <asp:Label ID="Label2" runat="server" Text="Rol:"></asp:Label>
            </td>
            <td class="style10">
                <asp:DropDownList ID="DropRoles" runat="server">
                    <asp:ListItem></asp:ListItem>
                    <asp:ListItem>Dos</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                <asp:CustomValidator ID="CustomValidator2" runat="server" 
                    ClientValidationFunction="ValidarRol" ControlToValidate="DropRoles" 
                    ErrorMessage="Seleccione un valor valido" 
                    onservervalidate="CustomValidator2_ServerValidate">*</asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td class="style8">
                <asp:Button ID="Acepatar" runat="server" Text="Agregar" />
                <asp:Button ID="btnCancelar" runat="server" Text="Eliminar" Width="77px" />
            </td>
            <td class="style9" colspan="2" rowspan="2">
                <asp:GridView ID="Grilla" runat="server" AutoGenerateColumns="False" 
                    BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                    CellPadding="2" ForeColor="Black" GridLines="None">
                    <Columns>
                        <asp:BoundField HeaderText="Legajo" />
                        <asp:BoundField HeaderText="Nombre" />
                        <asp:BoundField HeaderText="Rol" />
                    </Columns>
                    <FooterStyle BackColor="Tan" />
                    <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
                        HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                    <HeaderStyle BackColor="Tan" Font-Bold="True" />
                    <AlternatingRowStyle BackColor="PaleGoldenrod" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td class="style8">
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>

